package tech.aistar.corejava.day11;

import java.util.HashSet;
import java.util.Set;

/**
 * @author success
 * @version 1.0
 * @description:本类用来演示:
 * @date 2019/7/29 0029
 */
public class ArraySetDemo {
    public static void main(String[] args) {
        int[] arr = {1,2,1,2,3,4,2};

        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < arr.length; i++) {
            set.add(arr[i]);
        }

        System.out.println(set);
    }
}
